layui.use(['form','layer','table','laytpl'],function(){
    var form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery,
        laytpl = layui.laytpl,
        table = layui.table;
        
    //获取用户余额
    $.ajax({
    	type:"get",
    	url:"http://127.0.0.1:88/index.php/balance/balance/index?id="+localStorage.login_name,
    	success:function(res){
    		$(".balance").text(res.data);
    		console.log(res.data);
    	}
    });

})